<?php 
# Author    :  ELIZAR M. FLORES
# Copyright : Copyright? what do you mean copyright? The best thing in programming is OPEN SOURCE. So go ahead dig in.
#             If you know what you are doing, MODIFY and IMPROVE.
#             If you dont know what you are doing, READ and ASK.
#             If you are a hacker, Go somewhere else. 
#             If you are rich, Go ahead... DONATE!

class DATE
{
    public function format($date,$format='STANDARD')
    {
      switch(strtoupper($format))
        {
           case 'STANDARD'     : $newDate = date('F m, Y g:i a',  strtotime($date)); break;
           case 'STANDARD_DATE': $newDate = date('F m, Y',  strtotime($date)); break;
           case 'STANDARD_TIME': $newDate = date('g:i a',  strtotime($date)); break;
           case 'RAW'          : $newDate = $date; break;
           default             : $newDate = date($format,  strtotime($date)); break;
        }  
       
        return $newDate;
    }
}
?>
